package com.b511.swpu.cementbackend.repository;

import com.b511.swpu.cementbackend.entity.MAIN_OilField;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

public interface MAIN_OilFieldRepository extends JpaRepository<MAIN_OilField, String>,
        JpaSpecificationExecutor<MAIN_OilField> {

    @Transactional
    void deleteByRelationCode(String relationCode);

    @Transactional
    void deleteByOilCode(String oilCode);

    MAIN_OilField findByRelationCode(String relationCode);

    MAIN_OilField findByOilCode(String oilCode);

}
